package com.weilizhang.work1.service.impl;

import com.weilizhang.work1.mapper.StudentsMapper;
import com.weilizhang.work1.mojo.Students;
import com.weilizhang.work1.service.StudentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentsServiceImpl implements StudentsService {
    @Autowired
    private StudentsMapper studentsMapper;
    @Override
    public List<Students> list() {
        return studentsMapper.list();

    }
    @Override
    public Students select(Integer studentId) {

        return studentsMapper.select(studentId);
    }

    @Override
    public void delete(Integer studentId) {
        studentsMapper.delete(studentId);
    }

    @Override
    public void update(Students students) {
        studentsMapper.update(students);
    }

    @Override
    public void add(Students students) {
        studentsMapper.add(students);
    }


    @Override
    public List<Students> search(Students students) {
        return studentsMapper.search(students);
    }

    @Override
    public List<Students> searchWithPage(Students student, int offset, int limit) {
        return studentsMapper.searchWithPage(student, offset, limit);
    }

    @Override
    public int count(Students student) {
        return studentsMapper.count(student);
    }
}
